<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>优家购房系统 - 房屋信息更新</title>
<script type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="js/jquery-3.3.1.js"></script>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet"
	href="lib/font-awesome/css/font-awesome.css">

<script type="text/javascript">
	//根据传入的值默认选中option
	$(document).ready(function() {
		var sex = '${lessee.l_sex}';
		var status = '${lessee.l_status}';
		$("#test option").each(function() {
			//alert($(this).val());
			if ($(this).val() == sex) {
				$(this).attr("selected", true);
			}
		});
		$("#test2 option").each(function() {
			//alert($(this).val());
			if ($(this).val() == status) {
				$(this).attr("selected", true);
			}
		});
	});
</script>

</head>
<body
	style="background: url('image/bg3.jpg'); background-size: cover;">
	<div class="box">
		<h3>更新租户信息</h3>
		<form action="LesseeServlet2?method=update" method="post">
			<input type="hidden" name="id" value="${lessee.l_id }">
			<table class="form-table">
				<tr>
					<td>姓名</td>
					<td colspan="3" class="control"><input type="text" name="name"
						value="${lessee.l_name }"></td>
				</tr>
				<tr>
					<td>电话</td>
					<td colspan="3" class="control"><input type="text" name="tel"
						value="${lessee.l_tel }"></td>
				</tr>
				<tr>
					<td>性别</td>
					<td colspan="3" class="control">
							<select name="sex" id="test">
							<option value="1">男</option>
							<option value="0">女</option>
							</select>
					</td>
				</tr>
				<tr>
					<td>籍贯</td>
					<td colspan="3" class="control"><input type="text"
						name="nativePlace" value="${lessee.l_native_place }"></td>
				</tr>
				<tr>
					<td>身份证号码</td>
					<td colspan="3" class="control"><input type="text"
						name="idCard" value="${lessee.l_id_card }"></td>
				</tr>
				<tr>
					<td>添加时间</td>
					<td colspan="3" class="control">
						<input type="text"
						name="createTime" value="${lessee.l_create_time }" class="Wdate" onClick="WdatePicker()">
					</td>
				</tr>
				<tr>
					<td>租户信息状态</td>
					<td colspan="3" class="control">
					<select name="status" id="test2">
							<option value="1">正常</option>
							<option value="0">已失效</option>
					</select></td>
				</tr>
			</table>
			<div class="buttons">
				<input class="btn btn-primary va-bottom" type="submit" value="保存">&nbsp;&nbsp;
				<a class="btn btn-default" href="javascript:history.go(-1)">返回</a>
			</div>
		</form>
	</div>
</body>
</html>